#include"string.h"
using namespace std;
void test1()
{
    imitate::string s("hello");
    std::cout<<s.c_str()<<std::endl;
    imitate::string a(s);
    std::cout<<a.c_str()<<std::endl;
    s="world";
    a=s;
    std::cout<<s.c_str()<<" "<<a.c_str()<<std::endl;
}
void test2()
{
    imitate::string s1;
    s1.reserve(1000);
    s1.resize(100);
}
void test3()
{
    imitate::string s1("hello");
    size_t i=0;
    for(i=0;i<s1.size();i++)
    {
        cout<<s1[i]<<" ";
    }
    cout<<endl;
    const imitate::string s2("world");
    for(i=0;i<s2.size();i++)
    {
        //s2[i]='c';
        cout<<s2[i]<<" ";
    }
    cout<<endl;
    imitate::string::iterator it=s1.begin();
    while(it!=s1.end())
    {
        cout<<(*it)<<endl;
        it++;
    }
    imitate::string::iterator ite=s2.begin();
    while(ite!=s2.end())
    {
        cout<<(*ite)<<endl;
        ite++;
    }
}
void test4()
{
    imitate::string s1("hello");
    cout<<s1<<endl;
    cin>>s1;
    cout<<s1<<endl;
}
void test5()
{
    imitate::string s1("hello");
    imitate::string s2("world");
    cout<<(s1>s2)<<endl;
    cout<<(s1==s2)<<endl;
    cout<<(s1>s2)<<endl;
    cout<<(s1<s2)<<endl;
    cout<<(s1<=s2)<<endl;

}
int main()
{
  try 
  {
    //test1();
    //tmpest2();
    //test3();
    //test4();
    test5();
  }
  catch(const std::exception& e)
  {
    std::cout<<e.what()<<std::endl;
  }
  return 0;
}
